﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;

namespace SharePoint.Log.Viewer._2010
{
    public partial class frmChangeLOGSPath : Form
    {
        public frmChangeLOGSPath()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            folderBrowserDialog1.ShowDialog(this);
            if (folderBrowserDialog1.SelectedPath != "")
                txtLOGSPath.Text = folderBrowserDialog1.SelectedPath;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtLOGSPath.Text != "")
                ConfigurationManager.AppSettings["LOGSPath"] = txtLOGSPath.Text;

            this.Dispose();
        }
    }
}
